home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / tbbs / prgsourc.zip / HOMES.ZIP / ENEW.PRG < prev    next >
Text File  |  1996-01-14  |  5KB  |  184 lines

  1. PROCEDURE enew
  2.  
  3. SELECT a
  4.  
  5. SET DELETED OFF
  6. COUNT TO cnt 
  7. GOTO TOP
  8. x=1
  9. DO WHILE .NOT. Deleted() .AND. x < cnt
  10.    SKIP
  11.    x = x + 1
  12. ENDDO
  13. IF Deleted()
  14.    RECALL
  15.    SET DELETED ON
  16. ELSE
  17.    SET DELETED ON
  18.    IF cnt = 999
  19.       DO BoxB WITH 9,17,13,63
  20.       @ 10,22 SAY    "Maximum of 999 listings per locality."
  21.       @ 11,19 SAY "No more listings may be added at this time."
  22.       @ 12,30 SAY            "Please notify Sysop."
  23.       key = inkey(7)
  24.       DO cls WITH 0,0,23,79
  25.       RETURN
  26.    ENDIF
  27.    GOTO TOP
  28.    x = 1
  29.    DO WHILE x = Val(pic1) .AND. x < cnt
  30.       SKIP
  31.       x = x + 1
  32.    ENDDO
  33.    IF x # Val(pic1)
  34.       cnt  = x
  35.    ELSE
  36.       cnt = cnt + 1
  37.    ENDIF
  38.    APPEND BLANK
  39.    IF cnt < 10
  40.       pc1 = "00"+ Str(cnt,1)
  41.    ELSE
  42.       IF cnt < 100
  43.          pc1 = "0"+ Str(cnt,2)
  44.       ELSE
  45.          pc1 = Str(cnt,3)
  46.       ENDIF
  47.    ENDIF
  48.    REPLACE pic1 WITH pc1
  49. ENDIF                            && Pointer set to blank record except pic1            
  50. ok = .T.
  51.  
  52. IF own
  53.    brok = " "
  54.    DO cls WITH 2,0,20,79
  55.    DO BoxW WITH 4,10,7,37
  56.    @ 5,12 SAY "Select the listing agent"
  57.    @ 6,12 SAY "from the pick list"
  58.    DO pagnt
  59.    SELECT a
  60.    REPLACE broker WITH brok
  61. ELSE
  62.    REPLACE broker WITH agnte
  63. ENDIF
  64.  
  65. REPLACE date WITH Date()
  66.  
  67. **************************************************
  68. *       Subdivision
  69.  
  70. SET COLOR TO GR+/R
  71. @ 23,5 SAY "<Esc>"
  72. SET COLOR TO W+/R
  73. @ 23,11 SAY "= Subdivision not on list"
  74. DO cls WITH 2,0,20,79
  75. DO BoxW WITH 7,12,13,41
  76. @ 8,14 SAY  "Select the subdivision, or"
  77. @ 9,14 SAY  "  if not in a subdivision."
  78. @ 11,14 SAY "If the subdivision is not"  
  79. @ 12,14 SAY "listed, press <Esc>."
  80. SET COLOR TO GR+/W
  81. @ 9,14 SAY "S"
  82. cksub = " "
  83. DO psub WITH 1
  84.  
  85. IF cksub = " "                                  && <Esc> was pressed
  86.    SELECT e
  87.    APPEND BLANK
  88.    DO cls WITH 2,0,20,79
  89.    DO BoxW WITH 6,20,8,66
  90.    @ 7,22 SAY "Enter the name of the Subdivision" 
  91.    SET COLOR TO W+/W
  92.    @ 8,27 GET cksub PICTURE "@K "
  93.    READ
  94.    REPLACE sname WITH sb
  95.    SELECT a
  96.    REPLACE sub WITH sb
  97.    SET COLOR TO GR+/R
  98.    @ 21,0 CLEAR TO 23,79
  99.    @ 21,5 SAY "Up/Dn Arrow "
  100.    @ 22,5 SAY "<Enter> "
  101.    SET COLOR TO W+/R
  102.    @ 21,17 SAY "= Move within pick list"
  103.    @ 22,13 SAY "= Select from pick list"
  104.    DO cls WITH 2,0,20,79
  105.    DO BoxW WITH 7,6,10,47
  106.    @ 8,8 SAY "Choose the area from the list by high-"
  107.    @ 9,8 SAY "liting the area and pressing <Enter>"
  108.    key = InKey(4)
  109.    DO cls WITH 7,6,10,46
  110.    DO parea WITH 2
  111. ELSE
  112.    SELECT a
  113.    REPLACE sub WITH cksub
  114.    SELECT e
  115.    SEEK cksub
  116.    IF aname = "." 
  117.       SET COLOR TO GR+/R
  118.       @ 21,0 CLEAR TO 23,79
  119.       @ 21,5 SAY "Up/Dn Arrow "
  120.       @ 22,5 SAY "<Enter> "
  121.       SET COLOR TO W+/R
  122.       @ 21,17 SAY "= Move within pick list"
  123.       @ 22,13 SAY "= Select from pick list"
  124.       DO cls WITH 2,0,20,79
  125.       DO BoxW WITH 7,6,10,47
  126.       @ 8,8 SAY "Choose the area from the list by high-"
  127.       @ 9,8 SAY "liting the area and pressing <Enter>"
  128.       key = InKey(4)
  129.       DO cls WITH 7,6,10,46
  130.       DO parea WITH 2
  131.    ELSE
  132.       SELECT a
  133.       REPLACE area WITH e->aname
  134.    ENDIF
  135. ENDIF           
  136.  
  137. DO cls WITH 2,0,20,79
  138. DO BoxW WITH 7,5,11,50
  139. @ 8,7 SAY  "Select the home design from the pick list."
  140. @ 9,7 SAY  "Descriptions can be found in Help."
  141. @ 10,7 SAY "( Most homes will be             )"
  142. SET COLOR TO GR+/W
  143. @ 10,28 SAY "Traditional"
  144. DO pdes WITH 2
  145. DO cls WITH 2,0,20,79
  146. DO BoxW WITH 7,5,9,47
  147. @ 8,7 SAY "Select the exterior from the pick list."
  148. DO pext
  149. DO tf                                         && Trailer Full Scr Edit
  150. DO e2scr
  151.  
  152. SET FORMAT TO fnew NOCLEAR
  153. DO WHILE .T.
  154.    READ
  155.    DO CASE
  156.       CASE LastKey() = 3                         && <Page Dn>
  157.            IF size < 300 .OR. beds = 0 .OR. baths = 0
  158.               DO BoxB WITH 5,49,9,79
  159.               @ 6,51 SAY "One of the following values"
  160.               @ 7,51 SAY "is incorrect:  Home Size,"
  161.               @ 8,51 SAY "# of Bedrooms, # of Baths"
  162.               key = InKey(6)
  163.               DO cls WITH 5,49,9,79
  164.               LOOP
  165.            ENDIF
  166.            DO ty
  167.            DO BoxW WITH 5,49,9,79
  168.            @ 6,51 SAY "This data cannot be changed"
  169.            @ 7,51 SAY "after leaving this screen."
  170.            @ 8,51 SAY "  Is everything correct?"
  171.            Key = InKey(30)
  172.            IF LastKey() = 89 .OR. LastKey() = 121        && `Y' or `y'
  173.               DO cls WITH 5,49,9,79
  174.               EXIT
  175.            ENDIF   
  176.            DO cls WITH 5,49,9,79
  177.            LOOP
  178.       OTHERWISE
  179.            LOOP
  180.    ENDCASE
  181. ENDDO
  182. RETURN
  183.  
  184.